<?php 


$cs = Yii::app ()->getClientScript (); 
$cs = Yii::app ()->getClientScript()->registerCoreScript ('jquery'); 
$cs->registerScriptFile(Yii::app ()->request->baseUrl. "/js/jquery-ui-1.8.7.custom.min.js");
$cs->registerScriptFile(Yii::app ()->request->baseUrl. "/js2/JWidget.js");
$cs->registerScriptFile(Yii::app ()->request->baseUrl. "/js2/JTextWidget.js");


?>
<div id='abc'>sdfdfs</div>
 
 ddd
<div id='test' style="width:300px;height:300px;border:1px solid"></div>
<script type="text/javascript">

var widget = new JWidget(30,50,{buttons:[{src:'/images/cog1.png',events:{click:function(){alert(123);}}}],saveUrl:'<?php echo $this->createUrl('/test/edit')?>',saveCallback:function(data,status){alert(data + status);}});


</script>